package br.com.californiahotel.server.serviceImpl;

import br.com.californiahotel.client.service.LoginService;
import br.com.californiahotel.shared.models.User;

import com.google.gwt.user.server.rpc.RemoteServiceServlet;

@SuppressWarnings("serial")
public class LoginServiceImpl extends RemoteServiceServlet implements
		LoginService {

	@Override
	public boolean efetuarLogin(User model) {
//		TODO
//		try {
//		Conversor<User> conversor = new Conversor<User>();
//		new DatabaseUtils().find( conversor.convert( model,
//				 br.com.californiahotel.server.hibernate.models.Hospede.class));
//		} catch (Exception e) {
//			e.printStackTrace();
//			return false;
//		}
		if(model.getLogin().equals("hotel")){
			if (model.getSenha().equals("hcali")) {
				return true;
			}
		}
		return false;
	}

}
